<!DOCTYPE html>
<html>
    <head>
        <meta charset = "UTF-8">
        <meta name = "viewport" content = "initial-scale = 1.0,maximum-scale=1.0,user-scalable = no"/>
         <title></title>
         <style>
             div{
                 margin: 0 auto;
                 text-align: center;
             }
             #content div{
                 width:150px;
                 height: 150px;
                 margin-bottom: 20px;
                 font-weight: bold;
                 font-size: 30px;
                 line-height: 150px;
          }
          body{
              background-color: #cccccc;
          }
         </style>
         
    </head>
    <body>
        <div id="content">
            <div>div1</div>
            <div>div2</div>
            <div>div3</div>
        </div>       
        <script>
           window.onload = function(){ 
            var Pra = document.getElementById("content");
            var Pra1 = Pra.children[0];
            var Pra2 = Pra.children[1];
            var Pra3 = Pra.children[2];
            Pra.position = "relitive";
           
            Pra1.style.position = "absolute";
            Pra2.style.position = "absolute";
            Pra3.style.position = "absolute";
            Pra1.style.left = "10px";
            Pra2.style.left = "30px";
            Pra3.style.left = "50px";
            Pra1.style.top = "10px";
            Pra2.style.top = "30px";
            Pra3.style.top = "50px";
            Pra1.style.zIndex = "-1";
            Pra2.style.zIndex = "1";
            Pra3.style.zIndex = "0";
            Pra1.style.background = "red";
            Pra2.style.background = "green";
            Pra3.style.background = "blue";
            


           }
            
            
        </script>
    </body>

</html>